from django.db import models

# Create your models here.

class Publish(models.Model):
    pname=models.CharField(max_length=12)
    desc=models.CharField(max_length=10)

class Book(models.Model):
    name=models.CharField(max_length=20)
    price=models.DecimalField(max_digits=5,decimal_places=2)
    addtime=models.DateField(auto_now_add=True)
    isdel=models.BooleanField(default=False)
    publish=models.ForeignKey(Publish,on_delete=models.CASCADE)




